 CREATE EXTERNAL TABLE spmi_dws.dws_piece_transfer_operater_change_daily_summary(
    create_date                date            comment  '调整表产生日期'    ,
    belong_control_center_code string          comment  '成本中心（转运中心）'    ,
    belong_control_center_name string          comment  '成本中心（转运中心）'    ,
    financial_center_code      string          comment  '财务中心CODE'    ,
    financial_center_desc      string          comment  '财务中心名称'    ,
    gather_network_id          string          comment  '费用汇总网点id'    ,
    gather_network_code        string          comment  '费用汇总网点code'    ,
    gather_network_name        string          comment  '费用汇总网点name'    ,
    fee_type_code              string          comment  '费用类型code'    ,
    fee_type_name              string          comment  '费用类型name'    ,
    profit_loss_change_fee     decimal(18, 2) comment '损益发生金额',
    sgn                        int comment '损益正负值',
    change_cost                decimal(18,2)   comment  '调整费用金额'    ,
    inc_network_id             string          comment  '收入对象id'    ,
    inc_network_code           string          comment  '收入对象code'    ,
    inc_network_name           string          comment  '收入对象name'    ,
    dec_network_id             string          comment  '支出对象id'    ,
    dec_network_code           string          comment  '支出对象code'    ,
    dec_network_name           string          comment  '支出对象name'    ,
    project_code               string          comment  '项目编码'    ,
    project_name               string          comment  '项目名称'    ,
    profit_type                string          comment  '利润属性'    ,
    profits                    decimal(18,2)   comment  '影响利润'    ,
    data_source                string          comment '数据来源')
PARTITIONED BY (
    table_type string comment '表分类',
  `dt` date COMMENT '调整表产生日期create_date')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/spmi_dws.db/external/dws_piece_transfer_operater_change_daily_summary'  ;